package com.sword.ms_bwk.furniture;

import com.sword.ms_bwk.furniture.util.GUIType;
import com.sword.ms_bwk.furniture.util.UtilPackage;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape;

public abstract class AbstractFurnitureWithProperty {

    public String name, geoPath, texturePath;
    public boolean isLight;
    public GUIType guiType;
    public UtilPackage up;

    public AbstractFurnitureWithProperty(String name, String geo, String texture, boolean isLight, GUIType type, UtilPackage up) {
        this.name = name;
        this.geoPath = "geo/" + geo + ".geo.json";
        this.texturePath = "textures/block/" + texture + ".png";
        this.isLight = isLight;
        this.guiType = type;
        this.up = up;
    }

    public AbstractFurnitureWithProperty(String name, String geo, String texture, boolean isLight) {
        this(name, geo, texture, isLight, GUIType.Null, null);
    }

    public AbstractFurnitureWithProperty(String name, String geo, String texture) {
        this(name, geo, texture, false);
    }

    //默认方块形状
    public VoxelShape getShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) {
        return Shapes.block();
    }
}
